package com.web.controller.api;

import com.web.dao.VersionMapper;
import com.web.domain.ApiResponse;
import com.web.entity.Version;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author FDjavaone
 * @date 2017/9/20
 */

@RestController
@RequestMapping("api")
public class VersionController {

    @Autowired
    private VersionMapper versionMapper;

    @RequestMapping("/app/version")
    public ApiResponse getVersion(String platform){
        ApiResponse map = new ApiResponse();
        Version version=versionMapper.findByPlatform(platform);
        map.setStatus(900000);
        map.setMessage("获取成功！");
        map.setParams(version);
        return map;
    }

}
